<!--
 * @description: 组件
 * @Author: lhr
 * @Date: 2020-12-08 10:43:21
 * @LastEditors: lhr
 * @LastEditTime: 2020-12-18 15:57:49
-->
<template>
  <h2>组件创建函数</h2>
  <head-dyn3 :level="l1">我是一级标题</head-dyn3>
  <head-dyn3 class="test" :test="l1" level="2">函数式组件</head-dyn3>
  <input type="text" v-model="value" v-on:keyup.enter="submit" />
  <button @click="dia7Visible = true">显示审批选人组件</button>
  <transfer-select
    v-model:visible="dia7Visible"
    :addressRequestUrl="approveUrl"
    :allArea="1"
    :hideTab="true"
    @sure="sure1"
    :customParams="otherParams"
  >
  </transfer-select>
</template>
<script>
import HeadDyn3 from "@/components/HeadDyn3.vue";
import { ref, reactive } from "vue";
export default {
  components: {
    HeadDyn3,
  },
  setup() {
    let l1 = ref(1);
    let value = ref("");
    let dia7Visible = ref(false);
    let approveUrl = ref(
      "https://11.12.108.44/eoa-h5-war/h5/background/approve/app/employ/dept/plugin"
    );
    const otherParams = reactive({
      token: "d39d22d50bda429292bd9e4e28703327",
    });

    function submit() {
      console.log("11111");
    }
    function sure1(obj) {
      console.log(obj);
    }
    return {
      l1,
      value,
      dia7Visible,
      otherParams,
      approveUrl,
      submit,
      sure1,
    };
  },
};
</script>
